The thoracodorsal nerve arises from the posterior cord (C6, C7, C8) of the brachial plexus between the superior and inferior subscapular nerves.  It runs with the subscapular artery along the posterior axillary wall as far as the distal border of the latissimus dorsi muscle.

Supply
The thoracodorsal nerve supplies the latissimus dorsi muscle.